Here is a beautiful and minimalist way to go
(num > 1 && num < 5) ? first_case_method()
: System.out.println("testing case 1 to 5")
: (num > 5 && num < 7) ? System.out.println("testing case 5 to 7")
: (num > 7 && num < 8) ? System.out.println("testing case 7 to 8")
: (num > 8 && num < 9) ? System.out.println("testing case 8 to 9")
: ...
: System.out.println("default");