Here's how to do it
Line 0: Set the variable to 1
Line 1: Set the variable to a random value between 1 and 3. The way this works is it will set the value between what it already was and what you enter. That's why you need to set it to 1 first.
Line 2: Prints the value of brickchoice, this is optional and for testing.
Line 3: If brickchoice == 1 check for onvariable events on lines 4 through 4
Line 4: Teleport to brick A
etc
I attached the save file too.
Feel free to ask any questions.