title: Get Value From Json object contain table column using SQL Query
body: <p>I have a table <code>Books</code> with two columns <code>Id</code>, <code>BookCategory</code> in a SQL Server database, where <code>Id</code> is the primary key and <code>BookCategory</code> contains JSON object.</p>
  
  <p>This my table <a href="https://i.stack.imgur.com/T6X1B.png" rel="noreferrer">Books</a></p>
  
  <p>I'm trying to get table <code>BookCategory</code> column value as <code>Category</code> only. For that, I wrote the following SQL query but I didn't get. any have an idea about to get JSON object value as the normal column value as a query result.</p>
  
  <pre><code>SELECT 
      Id, BookCategory.Name AS Name, 
      BookCategory.Category AS Category 
  FROM
      Books
  </code></pre>
  
  <p>So the result will look like :</p>
  
  <pre><code>Id=1
  Name=CA
  Category=cs
  </code></pre>
  
  <p>And I'm getting an error in SQL Server Management Studio:</p>
  
  <blockquote>
    <p>The multi-part identifier "BookCategory.Name" could not be bound.</p>
  </blockquote>
  
  <p>Any help to get result same of the above table Books.</p>
  
  <p>Thanks in advance.</p>