В 8 версии MySQL появилась встроенная функция ROW_NUMBER(), для 5.7 и ниже можно использовать вот такой вариант
create table t (
name varchar(255),
value varchar(255)
);
insert into t values('name1', 'value1');
insert into t values('name2', 'value2');
insert into t values('name3', 'value3');
insert into t values('name4', 'value4');
insert into t values('name5', 'value5');
insert into t values('name6', 'value6');
insert into t values('name7', 'value7');
insert into t values('name8', 'value8');
insert into t values('name9', 'value9');
insert into t values('name10', 'value10');
insert into t values('name11', 'value11');
insert into t values('name12', 'value12');
insert into t values('name13', 'value13');
insert into t values('name14', 'value14');
insert into t values('name15', 'value15');
-- каждый 5-й
SELECT
num, name, value
FROM (
SELECT (@RN:=@RN+1) AS num, name, value
FROM t, (SELECT @RN:=0) AS t
) as d
WHERE num % 5 = 0;
+------+--------+---------+
| num | name | value |
+------+--------+---------+
| 5 | name5 | value5 |
| 10 | name10 | value10 |
| 15 | name15 | value15 |
+------+--------+---------+
-- каждый 3-й
SELECT
num, name, value
FROM (
SELECT (@RN:=@RN+1) AS num, name, value
FROM t, (SELECT @RN:=0) AS t
) as d
WHERE num % 3 = 0;
+------+--------+---------+
| num | name | value |
+------+--------+---------+
| 3 | name3 | value3 |
| 6 | name6 | value6 |
| 9 | name9 | value9 |
| 12 | name12 | value12 |
| 15 | name15 | value15 |
+------+--------+---------+
Это решение не зависит от колонки ID и удаленных элементов.