This not seems like a better method. But it gives solution:
DECLARE @Table TABLE(id int, TagId int, Entityname Varchar(100),EntityId INt, value VARCHAR(50))
INSERT INTO @Table VALUES(1,1,'TravelerProfile',856,'Finanace')
INSERT INTO @Table VALUES(2,2,'TravelerProfile',856,'A')
INSERT INTO @Table VALUES(3,3,'TravelerProfile',856,'pune')
select
distinct Entityname, EntityId,
stuff((
select ',' + 'OpenTag'+ CAST(u.id AS VARCHAR)+'MidTag'+ u.value+'EndTag'
from @Table u
where u.EntityId = EntityId
order by u.EntityId
for xml path('')
),1,1,'') as Value
INTO #temp
from @Table
group by Entityname,EntityId
SELECT Entityname, EntityId
,REPLACE(REPLACE(REPLACE(REPLACE(VALUE,'OpenTag','<Tags><TagId = "'),'MidTag','" value="'),'EndTag','"/></Tags>'),',','') Value
FROM #temp
DROP TABLE #temp
Output:
Entityname EntityId Value
TravelerProfile 856 <Tags><TagId = "1" value="Finanace"/></Tags><Tags><TagId = "2" value="A"/></Tags><Tags><TagId = "3" value="pune"/></Tags>