Simple example
SELECT CASE (i) CASE (3,5,7) PRINT*,"i is prime" CASE (10:) PRINT*,"i is > 10" CASE DEFAULT PRINT*, "i is not prime and is < 10" END SELECT
An IF .. ENDIF construct could have been used but a SELECT CASE is neater and more efficient. Another example,
SELECT CASE (num) CASE (6,9,99,66) ! IF(num==6.OR. .. .OR.num==66) THEN PRINT*, "Woof woof" CASE (10:65,67:98) ! ELSEIF((num >= 10 .AND. num <= 65) .OR. ... PRINT*, "Bow wow" CASE DEFAULT ! ELSE PRINT*, "Meeeoow" END SELECT ! ENDIF