Question: I have a very long conditional statement and I would like to make it multiline. I know how to do:

```
\begin{equation}
    A=
    \begin{cases}
      1, & \text{if}\ x=1, x=2 \\
      2, & \text{else}
    \end{cases}
\end{equation}

```

but would like something like:
[![enter image description here](https://i.stack.imgur.com/pDhZv.png)](https://i.stack.imgur.com/pDhZv.png)

Thank you

Answer: 
You can use `aligned`:

```
\documentclass{article}
\usepackage{amsmath}

\begin{document}

\begin{equation}
A=
\begin{cases}
  1, & \text{if }
       \begin{aligned}[t]
       x&=1\\
       x&=2
       \end{aligned}
\\
  2, & \text{otherwise}
\end{cases}
\end{equation}

\end{document}

```

[![enter image description here](https://i.stack.imgur.com/xZoKu.png)](https://i.stack.imgur.com/xZoKu.png)
Something like this?

[![enter image description here](https://i.stack.imgur.com/ctSMu.png)](https://i.stack.imgur.com/ctSMu.png)

```
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{equation}
    A=
    \begin{cases}
      1, & \text{if           $x=1$}\\
         & \text{\phantom{if }$x=2$}\\
      2, & \text{else}
    \end{cases}
\end{equation}
\end{document}

```