# How to make this equations aligned

I have an equation as below, I want text1 and text2, text3 are aligned as well.

\begin{aligned} A &= B \quad \text{text1}\\ C &= \begin{cases} 1 & \text{text2} \\ 0 & \text{text3} \end{cases} & \end{aligned}


You need to insert the same spacing as for the cases (only the first column), and correct for a "null delimiter" on the right:

\documentclass{article}
\usepackage{amsmath}% http://ctan.org/pkg/amsmath
\begin{document}
\begin{align*}
A &= \makebox[0pt][l]{$B$}
\hphantom{\begin{cases} 1\\0\end{cases}}\kern-\nulldelimiterspace
\text{text1} \\
C &=
\begin{cases}
1 & \text{text2} \\
0 & \text{text3}
\end{cases}
\end{align*}
\end{document}


The element B is inserted with a zero-width right overlap (equivalent to \rlap) to not interfere with the placement of text1.

An alternative where array environment with @{quad} alignment and {... \right is used.

\documentclass[]{article}
\usepackage{amsmath}
\begin{document}
\begin{aligned} A &= B \quad\quad \text{text1}\\ C &= \left \{ \begin{array}{r@{\quad}l} 1 & \text{text2} \\ 0 & \text{text3} \end{array} \right . & \end{aligned}
\end{document}