Hello Mahendra,
I would advise you then to use a marketplace module where you can insert a string as a query,
for example the oql module. So you can create a string variable and set up the query in there and then you can execute the query with an microflow query action.
This is a bit outside of the mendix tooling and less readable put I think for your use case the best way to do it.
Make sure you put some good documentation and annotation.
Hope this helps,
Good luck!
here an example flow