Name City
James Hyderabad
Mary Delhi
Peter Bangalore
John Mumbai
David Chennai
Rakesh Hyderabad
Gopal Bangalore
I want the second column values from city to become column name as below,
Name Hyderabad Delhi Bangalore Mumbai Chennai
if the column name is not exists then we need to create the column name if already contains skip creating that column