Hello Sooraj,
the INTO clause cannot be used in a dynamic statement. In additional also the usage of SQLScript variables in a dynamic statement is not supported, so you are also not able to store the result in a result variable.
Do you have the chance to solve your query without a dynamic statement? Maybe if you have a fix number of tables (or additional tables are added in a very rare frequence), you can create a view which unions all your table entries with an additional column representing your table identifier. With that you could do a select on that view with standard options just by restricting to the table identifier. No dynamic, vulnerable, bad performance statements would be necessary.
Regards,
Florian