SQL Pivot

Is it possible to do a pivot like SQL in the middle of other SQLs and joins?

For instance I have a SQL that goes like this.

select studentid, depstat, etc. then I want to add in columns for the fundid field value but then below each field name column I want to add amounts.