I have a table
Registration
╔══════╦══════════════╦══════════════╦═══════════════╗
║name1 ║ name2 ║ name2's state║ entity_id ║
╠══════╬══════════════╬══════════════╣═══════════════╣
║ 1 ║ 92 ║ complete ║ 152 ║
║ 92 ║ 1 ║ pending ║ 153 ║
╚══════╩══════════════╩══════════════╩═══════════════╝
Is it possible to replace a row's name2 state into "name1's state"? I mean A state 1-->92 is "complete" I know that state 92--->1 is "pending" the question is how to display the same information in the table in one row like in my_table? Is it possible?
my_table
╔══════╦══════════════╦═══════════════╦═══════════════╦═══════════════╗
║name1 ║ name2 ║ name2's state ║ name1's state ║ entity_id ║
╠══════╬══════════════╬═══════════════╣═══════════════╣═══════════════╣
║ 1 ║ 92 ║ complete ║ pending ║ 152 ║
║ 92 ║ 1 ║ pending ║ complete ║ 153 ║
╚══════╩══════════════╩═══════════════╩═══════════════╩═══════════════╝