The variable used in the CASE is specified in the SELECT statement.
The CASE itself only needs the value to compare ...
Code:
select case counter
  case 1
    brightness=50
    pwm led,brightness,cycle

  case 2
    brightness=100
    pwm led,brightness,cycle

... etc.