You indeed can.
Moreover in the case of animations which are strings you set arbitrarily, you could very well name your set of animations "Anim0", "Anim1", "Anim2", ...
And setting the animation to play to be "Anim" & SomeVariable ( for example casenumber) and then use the action set frame to be case.at(casenumber), factoring the use of casenumber, if it makes sense.