Delete rows in a table that has multiple FKs
If I got you right - you need to delete referencing rows prior to deleting the referenced rows.

begin transaction
DELETE Contenttasks
FROM contentdata
 where contentdata.contentid = contenttasks.contentid 
and contentdata.htmldata LIKE '%DV95%'

Delete from contentdata where htmldata like '%dv95%'
Commit