How to remove apostrophe (') from input text filter value?

Hello,

I am trying to implement this query logic from last few days and have tried many methods
but didn't get any luck

WITH OTA AS (

),

OTD AS
(

)

SELECT * FROM {{metric}}

{{metric}} value I am taking from dropdown list and I have fixed the list with OTA and OTD 2 values.

But the input I am getting from the filter with apostrophe e.g. 'OTA'

that's why my query is not working and giving me the error

Can anyone please help to solve this issue?

I don't think you'll be able to get what you're looking for. Metabase parameters were meant to be used for fields and not for making sql queries dynamic (e.g. dynamic schemas, tables or columns being pulled)