Going through the question, I understand that you need to include a subquery in the CASE clause of a field expression. If that is the case, then the result of the CASE statement must be a single value, not a result set. This is the behavior of Denodo Platform as well as other databases such as MYSQL.
In order to resolve the issue I would rewrite the query using[ joins](https://community.denodo.com/docs/html/browse/8.0/en/vdp/vql/queries_select_statement/from_clause/join_operation) and case statements that return single values.
You could refer to the[ CASE Clause](https://community.denodo.com/docs/html/browse/latest/en/vdp/vql/queries_select_statement/case_clause/case_clause) section of the Virtual DataPort VQL Guide for further information about the syntax of a case statement.
Hope this helps!