Well, it is very straight forward procedure. When you sync the iphone to your computer and when you click on your iphone setting in the itunes, there is option given to uncheck videos, music, apps, etc; so all you need to do is just unckeck the things that you do not want to sync in the computer and only the checked things will be synced in the computer.
If it still can't work,you may refer to this article
How to transfer iPhone Contacts, SMS, Calendar,Notes & Call History ,it also include transfering music.Hope it could help u.