CASE expression
A conditional expression that can be used to evaluate multiple expressions and
return a result.
Syntax
CASE
WHEN condition THEN result
[ ...n ]
[ ELSE result ]
END
[ ] marks optional components
Arguments
WHEN condition - The condition expression to evaluate.
THEN result - If condition evaluates to True then result is evaluated and returned.
ELSE result - If none of the above conditions evaluated to True then result is evaluated and returned.
Example
CASE
WHEN "column" IS NULL THEN 'None'
END