No one else has answered, so I'll chime in --- first of all, with the general conditions in which you want to script this, it seems your problem is more suited for a model, because you can quickly construct it out of ready-made system tools.
A simple model with Make Feature Layer and Copy Features with 3 input parameters (input fc/layer, expression, and output fc) will allow you to have the flexibility to open the Query Builder to compose and validate whatever query on the input layer you want. Additionally, if you right-click on the model and select 'Batch...', then you can run the whole process multiple times, essentially looping on each user-defined SQL query.
See the attached pics... should load in this order:
1- The model 'guts' containing 2 tools, MFL and Copy Features...
2- The single execution example, singleExecSetup (the default opening of the model, as you would run it once). The Query Builder window is also shown, opens from your tool interface SQL button as shown to the right of the Expression text box. Output fc result is already shown in map (black labels are Subdivision labels, same field queried by).
3- The multiple or 'batch' execution example, multiExecSetup (the batch opening of the model, looping on multiple input params). The labels: shown in black, Subdivision; shown in blue, Parcel IDs
4- The batch result --- shows how flexible the Query Builder is - notice the result of the 3rd query (from the 3rd line entered in 'batch mode'), which creates output for an ID range. All of these queries can be validated before the actual execution is launched, an extremely important quality I'd say.
Hope that helps.
-Wayne