One of the alternatives for nested if : 

Posted on by