Controls conditional branching. Unlike most systems, ClickHouse considers the condition `cond` and expressions `then` and `else`. This is needed to consider answer quickly.
If the condition `cond` evaluates to a non-zero value, returns the result of the expression `then`, and the result of the expression `else`, if present, is skipped. If the `cond` is zero or `NULL`, then the result of the `then` expression is skipped and the result of the `else` expression, if present, is returned.
**Parameters**
-`cond`– The condition for evaluation that can be zero or not. Can be [UInt8](../../data_types/int_uint.md) or `NULL`.
-`then` - The expression to return if condition is met.
-`else` - The expression to return if condition is not met.
**Returned values**
The function executes `then` and `else` expressions and returns its result, depending on whether the condition `cond` ended up being zero or not.