If keep_base_amount is null then I want to use country_id=236 in where clause, else I want to use keep_base_amount's value as in country_id.
I have query something like this:
SELECT * FROM account_treasury_local
WHERE
CASE WHEN keep_base_amount IS NOT NULL THEN country_id = keep_base_amount
ELSE country_id = '236' END
There is a record in database. But, I am getting nothing in result. Is there anything missing/wrong in above query.