I have a mysql table as in below figure.
Now i want to query to this table so that i get data as follows
If there is no parent then parent must be populated as "NONE" or Empty. How do i achieve this query? Is this even possible? I discussed this with my friend but still no answer. Any help would be appreciated. Thanks