in_category()
is conditional tag for taxonomy ‘category’. With custom taxonomies you should use has_term()
conditional, first parameter is term to check for and second is taxonomy.
if ( has_term( 'education', 'event-categories' ) ){
echo '<div>Test</div>';
}