Hello,
Did you try use conditions?
You can set different Formulas and different conditions. Based on the changed value in the text box/drop down, appropriate condition/Formula will be fired.
I hope this is what you are looking for.
Kalyan G Reddy
Infopath MVP 2007 and 2008