multiple if statement in mysql stored procedure