---
title: ES|QL conditional functions and expressions
description: Conditional functions return one of their arguments by evaluating in an if-else manner. ES|QL supports these conditional functions: 
url: https://www.elastic.co/docs/reference/query-languages/esql/functions-operators/conditional-functions-and-expressions
products:
  - Elasticsearch
applies_to:
  - Elastic Cloud Serverless: Generally available
  - Elastic Stack: Generally available
---

# ES|QL conditional functions and expressions
Conditional functions return one of their arguments by evaluating in an if-else manner. ES|QL supports these conditional functions:
- [`CASE`](https://www.elastic.co/docs/reference/query-languages/esql/functions-operators/conditional-functions-and-expressions/case)
- [`COALESCE`](https://www.elastic.co/docs/reference/query-languages/esql/functions-operators/conditional-functions-and-expressions/coalesce)
- [`GREATEST`](https://www.elastic.co/docs/reference/query-languages/esql/functions-operators/conditional-functions-and-expressions/greatest)
- [`LEAST`](https://www.elastic.co/docs/reference/query-languages/esql/functions-operators/conditional-functions-and-expressions/least)
- [`CLAMP`](https://www.elastic.co/docs/reference/query-languages/esql/functions-operators/conditional-functions-and-expressions/clamp) <applies-to>Elastic Stack: Preview since 9.3</applies-to> <applies-to>Elastic Cloud Serverless: Preview</applies-to>
- [`CLAMP_MIN`](https://www.elastic.co/docs/reference/query-languages/esql/functions-operators/conditional-functions-and-expressions/clamp_min) <applies-to>Elastic Stack: Preview since 9.3</applies-to> <applies-to>Elastic Cloud Serverless: Preview</applies-to>
- [`CLAMP_MAX`](https://www.elastic.co/docs/reference/query-languages/esql/functions-operators/conditional-functions-and-expressions/clamp_max) <applies-to>Elastic Stack: Preview since 9.3</applies-to> <applies-to>Elastic Cloud Serverless: Preview</applies-to>