You can, and i've done it in my project.
Here is how to do it:
1: Get at least 2 costumes, and put them into frames on a sprite.
2: Now, code it, say if you wanted a character to change it's look for 3 seconds when you press the spacebar, here is the code:
3: But in your case, your program would have to pick it at random using numbers, and variables, and it's just a whole lot more complicated.
Hope it helps!