Additional SQL Server features and topics not covered by specific categories
DECLARE @Customer TABLE (
Customer varchar(100),
Base_State varchar(2),
Append_State varchar(2)
);
INSERT INTO @Customer VALUES
('Joe Smith', 'CO', NULL),
('Mike Johnson', 'CO', 'CO'),
('Stacy Blue', NULL, 'CO'),
('Penny G', NULL, 'FL'),
('Jimmy Dean', 'MT', NULL),
('Money Mike', NULL, NULL);
SELECT *, ISNULL(Base_State, Append_State) AS State_Residence
FROM @Customer;