If your process is associated with any object, then create a custom attribute in that object. In the GEL script, update this custom attribute (with SQL update) based on the returned value of your SQL query. Then you can use this attribute in the Post Condition section to put the path against.