Rows to Columns

I have a table that stores data in rows rather than column (god knows why. I can't change the table as it is handled by clients.)

The data looks like this

```
CUSTDATA
--------
IdentificaitonId
FirstName
LastName
MiddleName

```

Sample data

```
CUSTDATA
--------
PID4587
FNAME1
LNAME1
MNAME1
PID4589
FNAME2
LNAME2
PID4959
FNAME3
LNAME3
MNAME3

```

`IdentificaitonId` always starts with `'PID'`, e.g. `PID4587`. First and Last Name is mandatory so it is never `NULL` or empty.

Is there any way I can query the table for the following output:

```
IdentificaitonId     FirstName   LastName   MiddleName
PID4587              FNAME1      LNAME1     MNAME1
PID4589              FNAME2      LNAME2     
PID4959              FNAME3      LNAME3     MNAME3

```