Si más si Ternary Php
var name = (variable === 1) ? 'foo' : ((variable === 2) ? 'bar' : 'baz');
Jaskaran
var name = (variable === 1) ? 'foo' : ((variable === 2) ? 'bar' : 'baz');