Decode artinya:
CASE FirstParam
WHEN SecondParam THEN ThirdParam
WHEN FourthParam THEN FifthParam
WHEN SixthParam THEN Seventh... etcetera
ELSE LastParam -- If number of params is odd, otherwise ELSE NULL is implied
END
Jadi
CASE APR(ACC.RATE,'X')
WHEN 'FIRST RATE' THEN 1
WHEN 'SECOND RATE' THEN 2
ELSE 3
END