SELECT child.Id, child.Name, child.ParentId, parent.Name as ParentName FROM your_table child JOIN your_table parent ON child.ParentId = parent.id;