You can solve complicated procedural problems with CASE expressions.
Oracle supports two CASE expression types:
In the simple CASE expression, you specify an input expression to be compared with the values in the WHEN ... THEN loop.
The implicit comparison operator is always the equal sign.
The left operand is always the input expression, and the right operand is the value from the WHEN clause.
In searched CASE expression you specify conditions in the WHEN clause.
You can use any logical operator in each individual WHEN clause.
CASE expressions are evaluated as follows:
You must handle data types in a consistent way.
The input expressions and the THEN results in the simple CASE expression must have the same data type.
In both CASE expression types the THEN results should have the same data type, too.