Without rehashing what the other gentlemen have said, If you still want to do this, there is no direct way... But you could use two Bit columns,
and then add a computed column that generates the values (0-3) that correspond to the values of the 2 bit columns....
CREATE TABLE [dbo].[testTable](
[colA] [bit] NOT NULL,
[colB] [bit] NOT NULL,
[CalcCol] AS (case [colA] when (1) then (2) else (0) end+[colB])
) ON [PRIMARY]
if you need a different set of four values then 0-3 just put them into the calculation formula:
CREATE TABLE [dbo].[testTable](
[colA] [bit] NOT NULL,
[colB] [bit] NOT NULL,
[CalcCol] As
(Case ColA
When 0 Then Case ColB WHen 0 Then ValueA Else ValueB End
Else Case ColB WHen 0 Then ValueC Else ValueD End
End)
) ON [PRIMARY]
Only issue is that calculated column is not directly "writable" - you'd have to write to the individual bit fields in separate code... like
Update TestTable Set
colA = Case When Value In (ValueA, ValueB) Then 0 Else 1 End,
colB = Case When Value In (ValueA, ValueC) Then 0 Else 1 End
Where ...