If x=3 then Display_messageX; If y=2 then Display_messageY; Else Display_messageZ; Else Display_messageZ;
Also check these Software Testing test papers, these are one of most attempted test paper in this category.