System.OutOfMemoryException SQL Server 2012 and 2008R2
The most likely problem is a memory limitation on the machine running Management studio. We have this problem some times when the client laptop only has 2GB-4GB of RAM. You could use the Export data function in Management Studio or the SQL Server "bcp Utility"

SQL Server Export Wizard: Right-Click on the Database > Tasks > Export Data


Bulk copy utility (bcp): Below is the sample syntax that we use and also links to the Microsoft documentation, note that xp_cmdshell needs to be enabled.
Sample syntax (all one line): 
exec master..xp_cmdshell 'bcp mydatabase.dbo.mytable out C:\Myfolder\MyFile.csv -c -t, -T -S ServerName\InstanceName'

Microsoft Link: https://msdn.microsoft.com/en-us/library/ms162802.aspx