SQL doesn't support merging cells like Excel, but you can group by FirstName and concatenate LastName values with a comma, as shown in the example, This might help achieve a similar result.
FirstName
LastName
https://dbfiddle.uk/EF7pEwFr