If you would like to get data by catId, then sue this:
SELECT TOP 6 CONVERT(VARCAHR(30),R.regDate,104) as regDate, R.profTitle, R.profDetails, R.cityName,
R.imgOne, R.navTag, R.visitCount, C.catName
FROM registerdata AS R LEFT JOIN categories AS C ON R.categoryId=C.catId
WHERE registerdata.statusFlag=1 AND C.catId = 1
ORDER BY R.visitCount desc
But if you would like to get data by CatName, use this:
SELECT TOP 6 CONVERT(VARCAHR(30),R.regDate,104) as regDate, R.profTitle, R.profDetails, R.cityName,
R.imgOne, R.navTag, R.visitCount, C.catName
FROM registerdata AS R LEFT JOIN categories AS C ON R.categoryId=C.catId
WHERE registerdata.statusFlag=1 AND C.catName = '%SomeName%'
ORDER BY R.visitCount desc
Read more about
JOINS[
^]
Here[
^] you can find a SQL tutorial.