I have one table.I want tha column names based on column values
|Field1 |Field2 |Field3 |Field4 |
|-------|-------|- ------ |-------|
| 1 | 0 | 0 |1 |
now i want the field name contain zero.Is this POssible in sql server.
What I have tried:
I've been trying to do various joins against sys.columns (and sys.tables), but so far to little avail.
What I have tried:
I've been trying to do various joins against sys.columns (and sys.tables), but so far to little avail.

Nitin SontakkeRank #264 · 9.6K reputationPosted Jan 5, 2017, 10:38 PM EST
Manas MohapatraRank #182 · 13.2K reputationPosted Jan 6, 2017, 12:45 AM EST
MayankRank #4,018 · 371 reputationPosted Jan 9, 2017, 12:53 AM EST