If you have a bitwise enum with 10 numbers, then they'll have values 1 through 512, at powers of 2. The range can therefore be 0 to 1023. Add a constraint like this:
CREATE TABLE sample
(
id INT PRIMARY KEY,
flags INT,
CONSTRAINT chk_flgs CHECK (flags BETWEEN 0 and 1023)
)
However, I would strongly caution against this. Relational databases are meant to allow accessing data in various ways and easily running queries against the data. Bitwise operators are not efficient in SQL. Think of a situation where you want to list all the matching flags? It'd be more normalized to create a lookup table with the enumeration values and add a cross reference table between your source and the lookup table.
The above sample would become this:
CREATE TABLE Flags
(
FlagID INT PRIMARY KEY, -- When inserted, match enum value
FlagName nvarchar(50)
);
CREATE TABLE SampleS
(
SampleID INT PRIMARY KEY
);
CREATE TABLE Xref_Sample_Flags
(
SampleID INT,
FlagID INT,
CONSTRAINT FK_SampleID FOREIGN KEY (SampleID) REFERENCES Sample (SampleID),
CONSTRAINT FK_FlagID FOREIGN KEY (FlagID) REFERENCES Flags (FlagID)
);
More tables, but in long run easier to maintain and query against.