DECLARE
v_job scott.emp.job%TYPE;
BEGIN
SELECT
MAX(job)
INTO v_job
FROM
emp
WHERE
empno = 7938;
CASE
WHEN v_job = 'CLERK' THEN
dbms_output.put_line('CLERK');
WHEN v_job = 'SALESMAN' THEN
dbms_output.put_line('SALESMAN');
ELSE
dbms_output.put_line('??');
END CASE;
END;
/