Run sql script result as job in SQL
This might work for your scenario:

Create a table "COMMANDS" to bulk the data from the select statement , and add a field to let you know if that row has been proccesed.

Once you have data on "COMMANDS" , you can create a procedure that exec all the statements 
that still un-proccesed. 

You can make it with a loop or a cursor or CTE ... 

Good luck.