That sounds like a pretty tricky requirement. It comprises many problems, so let's break it up a bit...
1. You need to know what tables and columns are available in the database / on the server
2. You need to pass this information to the SL app via a web service
3. You need a way of creating a query on the client side (I presume visually) out of the available information
4. You need to pass the query to the web service and retrieve the result
For the first and third steps you could refer to
this article which shows how to interrogate the schema and build a query with the results.
For the second and last steps you could refer to some of the techniques in
this article, which describes using Dynamic LINQ for dynamic queries and how to get dynamic results through a web service and use them on the client side.
Hopefully that will give you food for thought. If you want a more specific answer you'd have to narrow the question right down, as you're asking a very broad question.