The RAND function takes a seed value as an argument, not the maximum random value. You need to multiply the result of the random number by the maximum you need in order to get a random number in that range.

When I tested this I had to pass the random value into a variable first or it was just returning null sometimes. As mentioned by Gareth D in the comments, this is because the way the function evaluates RAND() will be called once each time a choice is checked for equality.