---
title: "Conditional testcase answers"
description: "A testcase can answer a question differently depending on the sample record or on earlier answers: condition columns with ALL, ANY and NONE groups, first match wins."
url: https://www.surveytester.com/academy/en/project-details/conditional-testcase-answers/
language: en
type: how-to
audiences: ["Survey Testers", "Project Managers"]
published: 2026-10-15
updated: 2026-10-15
tags: ["testcase", "conditions", "condition columns", "sample fields", "prior answers", "routing", "personas"]
---

# Conditional testcase answers

_Project Details · SurveyTester Academy_

One testcase, many respondents: a sample-driven test run carries a record that says who is being tested, and
the survey asks differently depending on earlier answers. With **conditional answers** a testcase question
gets one or more extra answer columns, each with a condition that decides when it applies.

## How a conditional answer works

Next to a question's base definition (*Exact* and *Pattern*) you add **condition columns**. Each column carries
its own answer definition and a condition built from:

- **Sample fields** of the record reserved for the test run - `SampleField:country = DE`.
- **Earlier answers** of the same run - `Question:q7 = yes`.

Criteria combine through **ALL**, **ANY** and **NONE** groups, nested as deeply as needed, without typing a
parenthesis. Values are picked from what is already known: the values found in your sample records, and for
single and multiple response questions the answer categories of the chosen question. The same editor is used
for result filters, so the handling is familiar.

During testing the columns are checked from left to right; **the first condition that matches supplies the
answer**, and when none matches the base definition applies. Existing testcases without columns behave exactly
as before.

![Placeholder: screenshot of a single-choice testcase question with the base definition and two condition columns, each with its own exact and pattern answers and a condition caption](https://www.surveytester.com/academy/_img/project-details/conditional-testcase-answers/en/testcase-condition-columns.png "w=44rem | Condition columns next to the base definition")

## Step by step

1. Open the testcase, go to the question and click **+ Condition**.
2. Give the column a name and build the condition: choose the source (sample field or question), the field or
   question, the comparison and the value - add criteria and groups as needed. The dialog shows the resolved
   condition as text while you build it.
3. Fill the column's answer definition like the base one (exact answers, pattern, sum).
4. Reorder columns with the arrows when several could match - the first match wins - and remove or edit them
   at any time.
5. Run the testcase: the test run steps show which answer was given.

![Placeholder: screenshot of the condition dialog with an ALL group holding a sample-field criterion and a question criterion, and the live preview text](https://www.surveytester.com/academy/_img/project-details/conditional-testcase-answers/en/testcase-condition-dialog.png "w=40rem | Building a condition")

## Notes

- Available for single, multiple, text and numeric questions; grids keep one definition.
- Condition columns travel along when a testcase is duplicated or saved as a template.
- A column whose condition matches but has no answer rows counts as no match; the next column is tried.
- Combine with [Use the answer of another question](https://www.surveytester.com/academy/en/project-details/testcase-answers-from-questions-and-sample)
  for answers that must stay consistent across questions.

## Key takeaway

Conditional answers let one testcase cover several respondent profiles: the condition picks the column, the
column answers, and the base definition catches everything else.
