MySQL эквивалентный декодирование Oracle
create procedure ora_sp_decode2 (out job_level TEXT )
begin
select CASE job_lvl
WHEN 1 THEN 'level 1
WHEN 2 THEN 'level 2'
ELSE 'Unknown level' end
into job_level from employee where job_id>0 ;
end ;
Panicky Platypus