Switch

num = 3
case num
when 1
p "one"
when 2
p "two"
when 3
p "three"
else
p "greater than 3"
end
# Output:
$ruby main.rb
"three"