The CASE expression is used to implement if-then logic.
The simple CASE expression returns the first result whose compareX value is equal to the input_expression.
compareX
input_expression
The searched CASE expression returns the first result whose conditionX is true.
conditionX