CASE WHEN evaluates a list of conditions and returns result expressions based on these conditions.
CASE WHEN statement consists of one or more conditions with associated result expressions.
The result expression of the first condition that evaluates to true is returned.
If no condition holds, the expression in the
ELSE part is returned.
ELSE is specified, and none of the conditions hold, NULL is returned (Since: CELONIS 4.5).
If a condition cannot be evaluated because an input column is NULL, NULL is returned.
All result expressions must be of the same type. The result type of the CASE WHEN statement is equal to the type of the result expressions.