Naive* answer: use Random() and scale its result to whatever range/limit you need.
e.g. to roll a six-sided dice: Ceiling ( Random * 6 )
*as in: there may be intricacies of Random() and or your process that this answer ignores.
For a simple choice between 2 items, you can use:
- Round ( Random ; 0 )
That will return either 1 or 0, and you can then run the appropriate "test."
Keep in mind that sometimes seed values used in the "Random" function can cause results to seem less random, but with only 2 outcomes, that's a subjective issue anyway.