Question: I have a table:

```
T (Mon varchar(3));

INSERT INTO T VALUES ('Y');

```

Case 1: 

```
DECLARE @day varchar(3) = 'Mon'

SELECT Mon 
FROM T;  --result : Y (no problem)

```

Case 2: 

```
DECLARE @day VARCHAR(3) = 'Mon'

SELECT @day 
FROM T; --result : Mon

```

If I want to get result `Y` in second case, how can I do that without re-designing the solution completely.

Answer: 
```
exec('select '+@day+' from #T;')

```
You can assign this @day variable using this command.
and dont forget to use "top 1" to limit only 1 row data to get.
SELECT top 1 @day = Mon FROM T;

then You can use @day in other queries.