Adding restriction to case evaluation of variables