Hi Sudipta,
To query on variables, prefix colon ( : ) before variable name.
Hence the query becomes
SELECT COLUMN_NAME1 FROM :TAB_VAR1;
Performance will degrage if you use SQL and CE script in the same procedure. Try to complete the requirement with only CE script or SQL script.
Regards,
Chandra.