This is a very broad question - what information are you collecting in the dialog?
Do you want to use this as a condition to run/not run the script - or to add information into the script?
Either way you can collect data from the dialog by storing it in a property. This property can then either be used as a condition or to populate part of your SQL script.
We have extensive information on how to configure SQL in our helpnet here:
Using Windows Installer Properties to Dynamically Replace Strings in SQL Scripts: