I think the solution is to use the switch statement, from Thymeleaf documentation:
User is an administrator
User is a manager
User is some other thing
There isn't any other structure to use in Thymeleaf, although you could use th:if/th:unless. Check this thread in the thymeleaf forum.