1SELECT product_id, product_type_id,
2 CASE product_type_id
3 WHEN 1 THEN 'Book'
4 WHEN 2 THEN 'Video'
5 WHEN 3 THEN 'DVD'
6 WHEN 4 THEN 'CD'
7 ELSE 'Magazine'
8 END
9FROM products;
1CASE [ expression ]
2
3 WHEN condition_1 THEN result_1
4 WHEN condition_2 THEN result_2
5 ...
6 WHEN condition_n THEN result_n
7
8 ELSE result
9
10END