Placeholders are for literal values, not just randomly inserting whatever you want. In many databases the substitution is done on the server side, and is limited to specific data types. You can't insert a chunk of SQL code like you're trying to.
Just build the SQL dynamically and ditch placeholders if you need to do this.