Skip to main content

Which

Which[test1,value1,test2,value2,…] evaluates each of the testi in turn, returning the value of the valuei corresponding to the first one that yields True. 

Please visit the official Wolfram Language Reference for more details and examples on core symbols.