Suppose we have three binary variables: $y_1$, $y_2$, and $y_3$. We want to enforce the following using one or more linear constraints:
$$ y_3 \text{ can only be 0 if exactly one of } y_1, y_2 \text{ is 1.}$$
How to do this? We can only add extra auxilliary binary variables.
This can be described as a set of linear inequalities: $$\begin{align} &y_3\ge 1-y_1-y_2\\ &y_3\le 1-y_1+y_2\\ &y_3\le 1-y_2+y_1\\ &y_3\ge y_1+y_2-1 \end{align}$$
These inequalities implement $y_1+y_2=1 \Leftrightarrow y_3=0$
Update
This is the "if then else" case, it follows the truth table:
$$ \begin{matrix} &y_1&y_2&y_3\\ &0 & 0& 1\\ &0 & 1& 0\\ &1 & 0& 0\\ &1 & 1& 1 \end{matrix} $$
If you only want the "if then" part, i.e. $y_1+y_2=1 \Rightarrow y_3=0$, with $$ \begin{matrix} &y_1&y_2&y_3\\ &0 & 0& \text{unrestricted}\\ &0 & 1& 0\\ &1 & 0& 0\\ &1 & 1& \text{unrestricted} \end{matrix} $$ you can use: $$\begin{align} &y_3\le 1-y_1+y_2\\ &y_3\le 1-y_2+y_1 \end{align}$$
You may actually mean: $y_1+y_2\ne 1 \Rightarrow y_3 \ne 0$:
$$ \begin{matrix} &y_1&y_2&y_3\\ &0 & 0& 1\\ &0 & 1& \text{unrestricted}\\ &1 & 0& \text{unrestricted}\\ &1 & 1& 1 \end{matrix} $$ then just use:
$$\begin{align} &y_3\ge 1-y_1-y_2\\ &y_3\ge y_1+y_2-1 \end{align}$$