You could use the if else queries
or you could execute a script like so...
local anim = getObject("Game.GameCurrentCharacter.CharacterCurrentOutfit.OutfitCharacterAnimations[insert_animation_name_here]")
startAnimation(anim) -- start the animation
...this would automatically get the current character & characters currently selected outfit plus the animation you want it to play. The startAnimation part will play the animation we just linked inside of the anim
Please note that this method should only really be considered if you were to name the animations exactly the same in each outfit.
Additionally please note that I have just written this out off the top of my head & thus I can not say 100% whether it is correct or not without actually testing it.
Also: there are other ways you could go about sorting this out, such as: using tables containing the relevant animation names for each outfit etc, but I won't go into that right now.