In order to present the user with a list of database objects, I would look into leveraging SQL Management Objects (SMO).
From there, you can either go the easy way or create a wizard-style interface with steps related to each part of a SQL statement and build up the text behind the scenes.
Once you have a SQL statement to execute, you should review the ADO.NET documentation to find out how to execute it.