Sql Where statement dynamic with case
I wouldn't use a case statement.  Just use boolean logic 

select *
  from table
 where (@duration = 0)
    or (@duration = 1 and duration &gt; 0)
    or (@duration = 2 and duration = 0)