

# CASE\$1OPERATION
<a name="recipe-actions.CASE_OPERATION"></a>

Create a new column, based on the result of logical condition CASE. The case operation goes through case conditions and returns a value when the first condition is met. Once a condition is true, the operation stops reading and returns the result. If no conditions are true, it returns the default value.

**Parameters**
+ `valueExpression` – Conditions.
+ `withExpressions` – Configuration for aggregate results.
+ `targetColumn` – Name for the newly created column.

**Example**  
  

```
{
  "RecipeStep": {
    "Action": {
      "Operation": "CASE_OPERATION",
      "Parameters": {
        "valueExpression": "case when `column11` < `column.2` then 'result1' when `column2` < 'value2' then 'result2' else 'high' end",
        "targetColumn": "result.column"
      }
    }
  }
}
```

## Valid aggregate functions
<a name="valid-aggregate-functions"></a>

The table below shows all of the valid aggregate functions that can be used in a case operation.

[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/databrew/latest/dg/recipe-actions.CASE_OPERATION.html)

## Valid conditions in a valueExpression
<a name="valid-conditions-table"></a>

The table below shows supported conditions and the value expressions you can use.

[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/databrew/latest/dg/recipe-actions.CASE_OPERATION.html)