Could anyone help me in converting this to CASE statement
I think this is it: CASE e.V_Billing_Currency_Code WHEN a.V_CHECK_CURRENCY_CODE THEN d.N_Applied_Amount ELSE CASE a.N_Exchange_Rate WHEN 0 THEN 0 ELSE (d.N_Domain_Amount/ a.N_Exchange_Rate) END END
This can be simplified to CASE WHEN e.V_Billing_Currency_Code = a.V_CHECK_CURRENCY_CODE THEN d.N_Applied_Amount WHEN a.N_Exchange_Rate = 0 THEN 0 ELSE (d.N_Domain_Amount/ a.N_Exchange_Rate) END
Part of the art of translating is knowing when to deviate from a literal translation. Since CASE has two alternate syntaxes, it's tempting to use the syntax that more closely resembles the DECODE syntax, but the other syntax gives a simpler formula.