Hi!
Considering you have take in account the dangers of that procedure, you'll need
Create a Action in the screen;
Put an AdvancedSQL widget
In the AdvancedSQL create a parameter , type "Text" , and with Expand In line = Yes

The parameter will get the content from the input field with tour users query

You must define or select in dependencies manager all the entities you want the users can query;
Sanitize the input string , and probably validate the content.
Then treat that action output as any other in your screen.
Last warning: that's one of the worst ideas I have read lately, you will regret it if you let your users to use that screen.
Good luck.
Graça