If we have more complex decision to take, it could come in handy a different form of CASE, the so called "searched" one:
WHEN expression THEN (...)
The structure is close to the "simple" form, but we have multiple expressions, one for each WHEN, all of them are sequentially executed, until we find one that evaluates to true. If none is found, we execute the code in the ELSE clause. If no ELSE clause is provided, the statement throw a case_not_found exception, just like the "simple" CASE.
Here is an example of searched case, based on the oracle hr test schema. We read a salary of a employee than we print a message accordingly to its value. We have a few cases. A salary is considered "top" if it is greater that 20000; high if in (10000, 20000]; average if in (6000, 10000]; low if in [3000, 6000]; and minimal otherwise, that means less than 3000:
l_id number(6,0) := 100;
where employee_id = l_id;
when l_salary > 20000 then
when l_salary > 10000 then
when l_salary > 6000 then
when l_salary >= 3000 then
when no_data_found then
dbms_output.put_line('No ' || l_id || ' among the employees.');
when others then
The chapter 4 of Oracle PL/SQL Programming, fifth edition, by Steven Feuerstein is about conditional and sequential control. There you would find a lot more info on CASE statements, searched or simple.