The number you get back from the built in random function will always be between 0 and 1. However, if you wanted a number between 0 and 3 you could just multiply the number you get back from random() with 3.
So you could also do this if you wanted to:
float Rand;
Rand=random(); // returns a number between 0.0 and 1.0
Rand*=3;
if (Rand<=1)
setmodel(Entity, Sprite Name);
else if (Rand<=2)
setmodel(Entity, Sprite2 Name);
else
setmodel(Entity, Sprite3 Name);