title: How to select one field value, along with the field's type and size?
body: <p>I want to read <strong>one field</strong> from table "<em>bfEvent</em>" along with the associated <em>Column Name</em>, <em>Data Type</em>, and <em>Max Length</em> of said field.  The field name will not be known (is passed in) and can be any datatype.</p>
  
  <p>Below is what I'm trying to do, although of course it does not work.</p>
  
  <p>Any ideas?</p>
  
  <p>
  -- VARS...
  <br />declare @Field   varchar(50)
  <br />declare @EventID int
  </p>
  
  <p>
  -- VALUES PASSED INTO STORED PROC...
  <br />set @Field   = 'Deadline'
  <br />set @EventID = 16
  </p>
  
  <pre><code>-- WHAT THE PROC SHOULD DO...
     select isc.Column_Name
          , isc.Data_Type
          , isc.Character_Maximum_Length
          , isc.Ordinal_Position
          , evt.@Field as Value        ***here is the problem***
     from INFORMATION_SCHEMA.COLUMNS isc
     where isc.Table_Name = 'bfEvent'
       and isc.Column_Name = @Field
       and isc.Column_Name = evt.@Field  ***and here***
       and evt.EventID = @EventID
  </code></pre>
  
  <p>
  The table bfEvent looks like:
  <br /><pre>
  EventID   int
  EventName varchar(50)
  EventDate datetime
  Deadline  datetime
  SomeText  text
  BoolFld   bit
  </pre>
  </p>