You don't need a special SQL Server license to use Visual Studio database projects. As mentioned in srutzky's answer the database projects are driven by SSDT which is a free download.
If you are willing to use a newer version of Visual Studio than 2012, and you want to use a database project within Visual Studio then you should consider Visual Studio 2015 Community Edition. As you can see in the "Muliple languages" section you can choose a "SQL Server" project type/template which is the database project.

As far as I recall none of the free versions of Visual Studio 2012 allowed you to create database projects. That means if you're committed to using Visual Studio 2012 to create/manage/etc. your database project then you'll need to buy an appropriate license for the version of Visual Studio 2012 you want to use.
Note the licensing restrictions are at the bottom of the Visual Studio 2015 Community Edition that I linked to above. The cliff notes version at the time of writing this answer is:
Individuals
Any individual developer can use Visual Studio Community to create their own free or paid apps.
Companies
An unlimited number of users within an organization can use Visual Studio Community for the following scenarios: in a classroom learning environment, for academic research, or for contributing to open source projects.
In non-enterprise organizations, up to five users can use Visual Studio Community. In enterprise organizations (meaning those with >250 PCs or >$1 Million US Dollars in annual revenue), no use is permitted beyond the open source, academic research, and classroom learning environment scenarios described above.
The full license terms are found here.