How to do an Oracle DECODE in MySQL
Oracle: NVL(Decode(shAccts.sub_ledger,’L’,’Labor’,’M’,’Materials’,’S’,’Services’,’Unknown’),’Unknown’)
MYSQL: ifnull(elt(field(shAccts.sub_ledger,'L','M','C'),'Labor','Materials','Services'),'Unknown') as TypeOfCharge