Can you use multiple formulas in a variable

I use formulas to combine text in a variable.But I have two formulas, and I want to use another variable to control which formula I use.Is there a way to do that?Thank you!

SolidworksSolidworks Pdm/enterprise Pdm