private CaseWhenThenExpression parseCaseWhenThenExpression(
      IoTDBSqlParser.CaseWhenThenExpressionContext context, boolean canUseFullPath) {
    // handle CASE
    Expression caseExpression = null;
    boolean simpleCase = false;
    if (context.caseExpression != null) {
      caseExpression = parseExpression(context.caseExpression, canUseFullPath);
      simpleCase = true;
    }
    // handle WHEN-THEN
    List<WhenThenExpression> whenThenList = new ArrayList<>();
    if (simpleCase) {
      for (IoTDBSqlParser.WhenThenExpressionContext whenThenExpressionContext :
          context.whenThenExpression()) {
        Expression when = parseExpression(whenThenExpressionContext.whenExpression, canUseFullPath);
        Expression then = parseExpression(whenThenExpressionContext.thenExpression, canUseFullPath);
        Expression comparison = new EqualToExpression(caseExpression, when);
        whenThenList.add(new WhenThenExpression(comparison, then));
      }
    } else {
      for (IoTDBSqlParser.WhenThenExpressionContext whenThenExpressionContext :
          context.whenThenExpression()) {
        whenThenList.add(
            new WhenThenExpression(
                parseExpression(whenThenExpressionContext.whenExpression, canUseFullPath),
                parseExpression(whenThenExpressionContext.thenExpression, canUseFullPath)));
      }
    }
    // handle ELSE
    Expression elseExpression = new NullOperand();
    if (context.elseExpression != null) {
      elseExpression = parseExpression(context.elseExpression, canUseFullPath);
    }
    return new CaseWhenThenExpression(whenThenList, elseExpression);
  }
function for parsing file path used by LOAD statement.
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/parser/ASTVisitor.java