for example we have table with three columns
Column A |  Column B | Column C
-------------------------------
P1       |    10     |    A    
P1       |    20     |    B
P1       |    30     |    C
P2       |    30     |    D
P2       |    40     |    E
How do I have to write SELECT query in Microsoft SQL to have this kind of result
Column A |     Column B      |   Column C
------------------------------------------
P1       |    10, 20, 30     |    A, B, C
P2       |    30, 40         |    D, E
 
    
 
    
 
     
    