set r to do shell script "echo $((RANDOM%3+1))"

if r = "1" then
	display dialog "r is 1" buttons ["Ok"] default button 1
else if r = "2" then
	display dialog "r is 2" buttons ["Ok"] default button 1
else if r = "3" then
	display dialog "r is 3" buttons ["Ok"] default button 1
end if

open random in the applescript editor