1: 2: 3: 4: 5:
--check status Select .... where x = 0 and y = 1 and B = (CASE When @QT= 'A' Then 1 End)