Check out example codes for "else if sql server". It will help you in understanding the concepts better.

Code Example 1

IF 1=1
	SELECT 1
ELSE
	SELECT 0
-- returns 1

-- Definition
IF Boolean_expression   
     { sql_statement | statement_block }   
[ ELSE   
     { sql_statement | statement_block } ]

Code Example 2

IF (Expression 1)
BEGIN
   Statement 1;
END

ELSE IF (Expression 2)
BEGIN
   Statement 2;
END
..........
ELSE 
BEGIN
   Default Statement;
END

Code Example 3

--Single line if statement
if RTRIM('t') = 't'
	SELECT 'equal to t'
    
--Single line if ... else
if RTRIM('b') = 't'
	SELECT 'equal to t'
else
	SELECT 'not equal to t'
    
-- if you need to exexute multiple lines, use BEGIN...END block
if RTRIM('T') = 't'
	BEGIN
		Select 'equal to t'
		Select 'and another select'
	END

Learn ReactJs, React Native from akashmittal.com