When the expression of a `select case` contains a function, the error "SELECT without CASE" is thrown. An intermediate variable must be used.