Suppose that we have a categorical variable $X$ that can take three values: $0$, $1$, or $2$. We use $X=0$ as the reference level. The following dummy variables are created: $$X_1 = 1 \ \text{if} \ X=1 \ \text{or} \ X_1=0 \ \text{if} \ X \neq 1$$
$$X_2 = 1 \ \text{if} \ X=2 \ \text{or} \ X_2=0 \ \text{if} \ X \neq 2$$
In a linear regression model, suppose we have $$Y = \beta_1 X_1 + \beta_2 X_2 + \epsilon$$
We know that $\beta_1$ compares $X=1$ vs $X=0$ and $\beta_2$ compares $X=2$ vs $X=0$. How would we get the coefficients that compares $X=2$ vs $X=1$? Would it be $\beta_1+\beta_2$?