Yes you can do it like that.
/help If then else
Basic format
if (v1 operator v2) { commands }
elseif (v1 operator v2) { commands }
else { commands }
While it doesn't show it, you can have as many elseif statements as you want, just remember that each "section" starts with an IF and (normally) ends with an ELSE
Under certain circumstances, you might not need the last ELSE, but without knowing the details of your code and how it's going to work, I can't say if this will apply to you or not