Case statements in filter

Hi all,
i am having an issue in creating a field filter for a column with a case statement.

SELECT fk_sender_id,
(SELECT company_name FROM Stardb.st_users AS u WHERE u.client_id=plogs.transaction_log.fk_sender_id) AS Sender_name,
fk_reciever_id,
(SELECT company_name FROM Stardb.st_users AS u WHERE u.client_id=plogs.transaction_log.abc_ref_no) AS Buyer_name,
(SELECT company_name FROM Stardb.st_users AS u WHERE u.client_id=plogs.transaction_log.fk_reciever_id) AS Reciver_name,
amount, req_type,abc_ref_no,
(CASE
WHEN req_type=1 THEN “Inward Remittance”
WHEN req_type=5 THEN “Creation Margin Paid For Auction”
WHEN req_type=7 THEN “Payment Received from Buyer”
WHEN req_type=8 THEN “Funds Transferred To Wallet”
WHEN req_type=9 THEN “Outward Remittance”
WHEN req_type=10 THEN “EMD Refunded after Auction completion”
WHEN req_type=11 THEN “EMD Refunded (Auction time lapsed)”
WHEN req_type=12 THEN “EMD Paid For Auction”
WHEN req_type=13 THEN “Payment Released to Seller”
WHEN req_type=14 THEN “Balance Amount Refunded to Buyer after Trade Complete”
WHEN req_type=15 THEN “ABC Commission taken from Buyer”
WHEN req_type=16 THEN “ABC Commission taken from Seller”
WHEN req_type=19 THEN “EMD Refunded. Auction Rejected after Completion”
WHEN req_type=20 THEN “EMD Refunded (Buyer & Seller).Trade Completed”
WHEN req_type=21 THEN “Creation Margin Refunded.Auction Rejected”
WHEN req_type=22 THEN “SD paid”
WHEN req_type=23 THEN “Balance paid”
WHEN req_type=24 THEN “Extra payment refund(less quantity or deduction etc)”
WHEN req_type=25 THEN “Money Taken from Defaulters”
WHEN req_type=26 THEN “Money Taken from Defaulters”
WHEN req_type=27 THEN “TCS Payment from buyer”
WHEN req_type=28 THEN “TCS Refund to buyer”
WHEN req_type=29 THEN “Payment made to Assayer”
WHEN req_type=33 THEN “Buyer SD Refund”
WHEN req_type=35 THEN “Payment Setoff (Positive)”
WHEN req_type=36 THEN “Payment Setoff (Negative)”
WHEN req_type=37 THEN “Payment for Lab Request taken by client”
WHEN req_type=38 THEN “Payment sent to Lab”
WHEN req_type=40 THEN “Stock Management Charges”
WHEN req_type=41 THEN “Labour Charges”
WHEN req_type=42 THEN “Assaying Charges”
WHEN req_type=43 THEN “Baggage Charges”
WHEN req_type=44 THEN “Weighment Charges”
WHEN req_type=45 THEN “Sutli Charges”
WHEN req_type=46 THEN “SD paid by Seller”
WHEN req_type=47 THEN “Seller SD refunded”
WHEN req_type=48 THEN “Seller SD Forfeit”
END) AS Req_type_status,
fk_order_id, created_date_time,bank_utr
FROM plogs.transaction_log
WHERE fk_order_id !=‘0’ AND plogs.transaction_log.isAbc= 1 AND plogs.transaction_log.fk_sender_id!=‘0’ and plogs.transaction_log.pay_status!=0

i want to add a field filter for the Req_type_status with values in dropdown as ‘Seller SD Forfeit’ , “Seller SD refunded”…etc… and not the numbers.

P.S. in the original table the “Req_type_status” column had numbers itself.

Hi @prashantpnd07
Then you need to use remapping:
https://www.metabase.com/docs/latest/administration-guide/03-metadata-editing.html#remapping-column-values