Try:
SqlConnection connection = new SqlConnection ("...");
connection.Open ();
SqlCommand command = new
SqlCommand ("select PdfFile from Table", connection);
byte[] buffer = (byte[]) command.ExecuteScalar ();
connection.Close();
FileStream fs = new FileStream(@"C:\test.pdf", FileMode.Create);
fs.Write(buffer, 0, buffer.Length);
fs.Close();