Without seeing any code, it is difficult to determine what you are doing wrong. If you are trying to pick a different action based on the random selection, you should use one of the following structures.
If n = 1
DoFirstThing()
ElseIf n = 2
DoSecondThing()
ElseIf n = 3
DoThirdThing()
EndIf
Alternatively, you can use Select/Case
Select n
Case 1
DoFirstThing()
EndCase
Case 2
DoSecondThing()
EndCase
Case 3
DoThirdThing()
EndCase
EndSelect
The nice thing about Select/Case is that you can combine results. So if choice 1 and 3 have the same outcome, you can do
Case 1, 3
DoSomething()
EndCase