Having trouble getting nested variables to work together

I believe this has been replied here:

For your case it should be:

SELECT t.column1 FROM table t  WHERE  t.column2= ANY(ARRAY[$variable]::varchar[])