Yes it is possible. Create a WCF method that accepts a string
which is the query. For the return type, you probably have to do some more work to make it manageable. Probably you need some kind of collection of DTO objects, which requires either a very flexible design of the DTO objects or limitations on the allowed result set of the query.
There is a discussion on returning datasets/datatables from a web service in the Can I serialize a Data Table or Data Set to transfer over a Web Service in C#? SO question.
As @w0lf points out, there can be severe security risks that you must take into consideration. What you will be doing is to give anyone with access to your WCF service access to run arbitrary queries on your SQL server. It can be done safely, if you run those queries under a specific account on the SQL server with carefully crafted permissions. See e.g. http://data.stackexchange.com that permits SQL queries to be run - with a read-only user.
Generally I think that it is a bad idea to supply queries as strings, but if you really neeed it, it is indeed possible.