Compare each column in a row and return an error if any of them is different
I see this question is tagged both Excel and SQL Server.



In Excel you could use the approach from here

The formula in cell F2 above is

=IF(SUM(IF(FREQUENCY(IF(LEN(B2:E2)&gt;0,MATCH(B2:E2,B2:E2,0),""), IF(LEN(B2:E2)&gt;0,MATCH(B2:E2,B2:E2,0),""))&gt;0,1))&gt;1,"MisMatch","Match")


Pay attention to the note in the linked article


  The formulas in this example must be entered as array formulas. Select
  each cell that contains a formula, press F2, and then press
  CTRL+SHIFT+ENTER.


Curly braces will then appear around the formula in the formula bar



Another (SQL Server) way (credit to Geoff Patterson for improvements) would be

SELECT T.Identifier,
       CASE
         WHEN min_val &lt;&gt; max_val
           THEN 'MisMatch'
         ELSE 'NoIssue'
       END
FROM   @T T
       CROSS APPLY (SELECT MIN(Val),
                      MAX(Val)
                    FROM   (VALUES (Value1),
                                   (Value2),
                                   (Value3),
                                   (Value4)) V(Val)) V(min_val, max_val) 


It should work well for the "hundreds of columns" mentioned.

Though it introduces some extra complexity into the plan compared to just a simple compute scalar.