How to randomise an animation - this or that?


I'm working on a 'this or that' style of filter. The goal is that every time you pick the 'left' option, the option on the 'right' changes etc. So far i set it up by script behaviour so every time the user tilts its head, the animation on opposite side plays for 0.1 second so the frame changes. But my aim would be for a frame to change to a random frame within the animation sequence. Any advice how to achieve this?