I am able to find out the duplicate data using this query
   SELECT names FROM group GROUP BY names HAVING count(*) > 1
I am able to get the duplicate data.I just need to know how to rename this duplicate data with the name to new
  INPUT
+-----------------+               
| names           |
+-----------------+
| text1           |
| text2           |
| text3           |
| text1           |
| text3           |
| text4           |
+-----------------+
OUTPUT  
+-----------------+
| names           |
+-----------------+ 
| text1           |
| text2           |
| text3           |
| text1 new value |->RENAMED
| text3 new value |->RENAMED
| text4           |
+-----------------+
 
     
     
    