if x == 1 foo() else if x == 2 bar() else foobar() end if