 <p>simply you can do this --</p> <p>there are so many option or answer available for this. one of these is as follow--</p> <pre><code>select case when b.c_1 = 1 then b.col1 else null end col1, b.col2 col2, b.col3 col3 from ( select distinct col1,col2,col3, rownum() over(partition by col1) c_1 from table_name )b </code></pre> <p>now assume / modify above query - </p> <p>table_name is the table name col1 , col2 and col3 is your table's column name.</p> <p>just modify this query as per your table name and structure and see..</p> <p>it would be your required solution.</p>