You can use standard conditionals for this, but all category information must be inside the {categories} variable pair for context.
{exp:weblog:entries weblog="yourweblog"}
{categories}
{if category_id == "54"} conditional content here {/if}
{/categories}
{/exp:weblog:entries}
Category:Entries Category:Templates Category:Categories
