0 - 1 of 1 tags for jdbc case when

I was trying to do following with Teradata JDBC (14.00.00.09)

String sql = "SELECT DISTINCT CASE WHEN 'All' = ? THEN LOV.VAL  ELSE ? END  FROM  LOV"; 

ps = conn.prepareStatement(sql, ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY );

 

And it gives me following error: