You could also use CROSS APPLY with VALUES to calculate the result and then refer to that value in your CASE statement e.g. ...
SELECT RUT, xa.VerifDigit, CASE WHEN xa.VerifDigit = '10' THEN 'K' WHEN xa.VerifDigit = '11' THEN '0' -- this will never occur ELSE xa.VerifDigit END FROM Citizen CROSS APPLY (VALUES(cast((11 - (( substring(RUT, 1, 1) * 3 + SUBSTRING(RUT, 2, 1) * 2 + SUBSTRING(RUT, 3, 1) * 7 + SUBSTRING(RUT, 4, 1) * 6 + SUBSTRING(RUT, 5, 1) * 5 + SUBSTRING(RUT, 6, 1) * 4 + SUBSTRING(RUT, 7, 1) * 3 + SUBSTRING(RUT, 8, 1) * 2) % 11)) AS char(2)))) xa(VerifDigit)
A couple of things worth pointing out though...
- You will need to cast the result (VerifDigit) to a character datatype if you are replacing it with 'K' otherwise the CASE will fail with a data conversion; this is shown in the example.
- The result of Modulo (%) 11 will never be 11; the remainder of anything divided by 11 will be between 0 and 10, so the second CASE/WHEN will never be hit.