CASE
Goes through conditions in sequence and returns the value of the result associated with the matching condition.
Syntax 1
Parameters
Returns
- The result associated with the first condition that evaluates to true. Or,
- The result in the ELSE clause if no condition evaluates to true. Or,
- NULL if there is no ELSE clause and no condition evaluates to true.
Syntax 2
Parameters
Returns
- The result associated with the first value that matches the expression. Or,
- The result in the ELSE clause if no value matches the expression. Or,
- NULL if there is no ELSE clause and no value matches the expression.