Can I execute a if statement in Query Database

Hi Team

I have a requirement where I need to generate different update query statements for different tables depending on some conditions in a  process model.
Do we have any feature to implement this? 
I do not want to use a XOR gate and create different nodes from XOR condition as the query statements may be huge.
Or if we can generate the query statement in a Script Task and directly call the query to update the tables in the process model.
We use Appian version 21.1

Thank you!!

  Discussion posts and replies are publicly visible