http://www.orafaq.com/faq/how_does_one_implement_if_then_else_logic_in_a_select_statement
How does one implement IF-THEN-ELSE logic in a SELECT statement?
Submitted by admin on Sat, 2005-11-12 06:38
Oracle SQL supports several methods of coding conditional IF-THEN-ELSE logic in SQL statements. Here are some: