You may refer to this post of mine
http://stackoverflow.com/questions/3092121/sql-going-nuts-does-not-accept-parameters
Simply put I don't have a choice I have to take input of which table the user wants and what the user wants from that table.
Please suggest a secure way to achieve this, within the limitations of the code
Thank you.