z.B. so:

Code:
Select Coalesce(Min(Case Status When 0 then 'ungültig'
                                When 1 then 'gültig'
                                End), 'gültig')
  into :Ergebnis           
  from x
  Where Wert = :Wert
  Group By Id;