@SuppressWarnings("rawtypes")
    @Override
    public Object parse(SourceData sourceData, int rowIndex, Context context) {
        if (switchValue == null) {
            for (CaseWhen caseWhen : caseWhens) {
                if (((ExpressionOperator) caseWhen.condition).check(sourceData, rowIndex, context)) {
                    return caseWhen.result.parse(sourceData, rowIndex, context);
                }
            }
        } else {
            for (CaseWhen caseWhen : caseWhens) {
                Comparable left = (Comparable) switchValue.parse(sourceData, rowIndex, context);
                Comparable right = (Comparable) ((ValueParser) caseWhen.condition).parse(sourceData, rowIndex, context);
                if (OperatorTools.compareValue(left, right) == 0) {
                    return caseWhen.result.parse(sourceData, rowIndex, context);
                }
            }
        }
        return elseResult == null ? null : elseResult.parse(sourceData, rowIndex, context);
    }
CASE value WHEN compare_value THEN result [WHEN compare_value THEN result ...] [ELSE result] END
CASE WHEN condition THEN result [WHEN condition THEN result ...] [ELSE result] END

The first CASE syntax returns the result for the first value=compare_value comparison that is true.
The second syntax returns the result for the first condition that is true.
If no comparison or condition is true, the result after ELSE is returned, or NULL if there is no ELSE part.
inlong-sdk/transform-sdk/src/main/java/org/apache/inlong/sdk/transform/process/parser/CaseParser.java