CASE

CASE example

  
DECLARE 
	v_num NUMBER:=5;
	v_out VARCHAR2(12);
BEGIN
	CASE v_num
		WHEN 1 THEN v_out:='A'; 
		WHEN 5 THEN v_out:='B';
		WHEN 8 THEN v_out:='C';
		ELSE v_out:='D';
	END CASE;
	DBMS_OUTPUT.put_line(v_out);
END;

Output:

B